<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */


/**
 * Smarty username modifier plugin
 *
 * Type:     modifier<br>
 * Name:     nomail<br>
 * Purpose:  sanitizes usernames containing emails
 * @param string
 * @return string
 */
function smarty_modifier_nomail($string)
{
	if (false === strpos($string, '@')) return $string;
	return substr($string, 0, strrpos($string, '@'));
}

